<?php $section='Home'; 
	include_once('inc/functions.php');
	require_once 'Users/data.php';
	require_once 'Users/edit.php';
        require_once('inc/authentication.php');
        if(isset($_REQUEST['email']))
                DoLogin($_REQUEST['email'],$_REQUEST['password']);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="inc/site.css" />
<title>Home</title>
</head>

<body>
<? //include("inc/tabs.php"); ?>
<div id="container">
<div id="logo"><img src="logo.png" alt="Logo" height="117" width="619" /></div>
<div id="nav"> 
<ul>
	<li><a href="home.php">Home</a></li>
	<li><a href="products.php">Products</a></li>
	<li><a href="Users/index.php">Users</a></li>
	<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
<div id="content">
<a href="http://www.webdevfoundations.net/scripts/cart.asp?view=yes"><img class="floatright" src="view.jpg" alt="Shopping Cart" width="98px" height="28px" /></a>
	  <label for="FirstName">First Name</label>
                <input  type="text"
                        name="FirstName" id="FirstName"
                    value="<?=$rs['FirstName']?>"
                    class="<?=isset($errors['FirstName']) ? 'error' : '' ?>" />
            <span class="error"><?=$errors['FirstName']?></span>
            <br />
                <label for="LastName">Last Name</label>
                <input  type="text"
                        name="LastName" id="LastName"
                    value="<?=$rs['LastName']?>"
                    class="<?=isset($errors['LastName']) ? 'error' : '' ?>" />
            <span class="error"><?=$errors['LastName']?></span>
            <br />
                <label for="Password">Password</label>
                <input  type="text"
                        name="Password" id="Password"
                    value="<?=$rs['Password']?>"
                    class="<?=isset($errors['Password']) ? 'error' : '' ?>" />
            <span class="error"><?=$errors['Password']?></span>
            <br />
                <label for="Lookup_id">Lookup_id</label>
                <input  type="number"
                        name="Lookup_id" id="Lookup_id"
                    value="<?=$rs['Lookup_id']?>"
                    class="<?=isset($errors['Lookup_id']) ? 'error' : '' ?>" />
            <span class="error"><?=$errors['Lookup_id']?></span>
            <br />
                <label for="PictureURL">PictureURL</label>
                <input  type="text"
                        name="PictureURL" id="PictureURL"
                    value="<?=$rs['PictureURL']?>"
                    class="<?=isset($errors['PictureURL']) ? 'error' : '' ?>" />
            <span class="error"><?=$errors['PictureURL']?></span>
            <br />
                <label for="FBID">FBID</label>
                <input  type="text"
                        name="FBID" id="FBID"
                    value="<?=$rs['FBID']?>"
                    class="<?=isset($errors['FBID']) ? 'error' : '' ?>" />
            <span class="error"><?=$errors['FBID']?></span>
            <br />
            <input type="submit" value="Save"  name="Save"/>
        </form>
</div>

<? if(IsLoggedIn()){ ?>
                <h1>You are Logged In</h1>
                <script type="text/javascript">
					function logout(){
						<?php session_destroy();?>
					}
				</script>                	<form>
                    	<input type="submit" onClick="DoLogOut()" value="Log Out" />
                    </form>
    <? }else{ ?>
        <form method="post">
               <h3>Log In:</h3><input type="email" name="email" autofocus title="Please type you email" />
            <input type="password" name="password" title="Your Passord" />
            <input type="submit" value="Log In" />
        </form>
        <form action="creatAcct.php">
        	<input type="submit" onClick="creatAcct.php" value="Create Account" />
        </form>
    <? } ?>
<div id="footer"><i>Copyright &copy; 2011 E-commerce site</i><br />
<a href="mailto:npratt3284@gmail.com">npratt3284@gmail.com</a></div>

</div>

</body>
</html>